<template>
	<view v-if="state.car_lease" @click="lease">
		<image :src= "state.urlImage" class="phonezu"></image>
	</view>
</template>

<script>
	import config from "@/config.js";
	export default {
		name: "InterestFree",
		props: {

		},
		data() {
			return {
				state: {
					car_lease: "",
					urlImage:"",
				},
			}
		},
		onLoad() {
			// this.urlImage = config.app_url
		},
		methods: {
			/*获取配置信息*/
			setCarLease() {
				
				this.state.car_lease = uni.getStorageSync('car_lease_show');
			
				if(this.state.car_lease) {
					console.log('AA 以租代购打开')
				}
				else{
					console.log('AA 以租代购关闭')
				}
				
				this.state.urlImage = config.app_url + 'image/phonezu.png'
			},
			// 跳转以租代购
			lease() {
				uni.navigateTo({
					url: "/pages/order/lease",
				});
			},
		},
		// onShow() {
		
		// 	this.setCarLease();
		// },
		// onLoad(options) {
		// 	this.setCarLease();
		// },
		created() {
			this.setCarLease();
		}
	}
</script>

<style lang="scss" scoped>
	.phonezu {
		border-radius: 16rpx;
		width: 100%;
		height: 290rpx;
	}
</style>